Conventionally, with regard to an IC card such as a Java Card (registered trademark), there are technologies that are capable of adding or deleting application programs. However, in conventional technologies, it is not possible for an IC card to modify programs such as an OS. There is a problem with a conventional IC card in that, in the case where a patch program is applied to fix a bug in a software program during operation, if a disturbance such as power interruption occurs, the patch program may not be applied correctly.